/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<template>
  <m-list-construction title="调度中心">
    <template slot="operation">
      <!-- <el-button type="primary" :plain="['t','g','m'].includes(unit)" size="mini" @click="unit='p'">PFLOPS</el-button>
      <el-button type="primary" :plain="['p','g','m'].includes(unit)" size="mini" @click="unit='t'">TFLOPS</el-button>
      <el-button type="primary" :plain="['t','p','m'].includes(unit)" size="mini" @click="unit='g'">GFLOPS</el-button>
      <el-button type="primary" :plain="['t','g','p'].includes(unit)" size="mini" @click="unit='m'">MFLOPS</el-button> -->
    </template>
    <template slot="content">
      <mChart></mChart>
      <!-- <m-spin :is-spin="isLoading" :is-left="isLeft"></m-spin> -->
    </template>
  </m-list-construction>
</template>
<script>
  import { mapActions } from 'vuex'
  // import store from '@/conf/home/store'
  // import mStatistics from './_source/statistics'
  import mChart from './_source/chart3'
  import mListConstruction from '@/module/components/listConstruction/listConstruction'

  export default {
    name: 'scheduler-overview',
    data () {
      return {
        total: null,
        isLoading: true,
        isLeft: true,
        item: {},
        createDialog: false,
        unit: 'p',
      }
    },
    props: {},
    methods: {
      ...mapActions('router', ['getRouteListPaging']),

      _create () {
        this.item = {}
        this.createDialog = true
      },
      onUpdate () {
        this._debounceGET('false')
        this.createDialog = false
      },
      close () {
        this.createDialog = false
      },
      _getList (flag) {

      }
    },
    watch: {
      // router
      '$route' (a) {
        // url no params get instance list
      }
    },
    beforeDestroy () {
      sessionStorage.setItem('isLeft', 1)
    },
    components: { mListConstruction, mChart }
  }
</script>
